<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("peopleimage").src="images/child.png";
			document.getElementById("dialog").innerHTML = "Jimmy says angrily: <br/>You want to know about the kidnapping? Fine! The whole kidnapping is my fault! Happy now?";
			$("#dialog").click(dialog1);
		}
	);
	
	function dialog1()
	{
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "What is Jimmy talking about? Is there something about the kidnapping that I don't know about?";
		$("#dialog").click(dialog2);
	}
	
	function dialog2()
	{
		document.getElementById("dialog").innerHTML = "I say: <br/><div onclick=\"dialog3()\">1. Jimmy, why is the kidnapping your fault?</div><div onclick=\"dialog4()\">2. Jimmy, are you hiding something from me? Is this kidnapping even real?</div>";
		$("#dialog").unbind('click');
	}
	
	function dialog3()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>It doesn't matter, is it? You think everything is my fault! I'm never good enough to deserve you spending time with me!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(endscene);
		}
	}
	
	function dialog4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Yes...";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(toend2);
		}
	}
	
	function toend2()
	{
		window.location = "end3.php";
	}
	
	
	function endscene()
	{
		$("#dialog").unbind('click');
		$("#dialog").fadeOut(5000,nextscene);
	}
	
	function nextscene()
	{
		window.location = "inter.php";
	}
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/office.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>




</body>
</html>